package com.changgou.seckill.config;

import org.springframework.amqp.core.Queue;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class RabbitMQConfig {

    //定义一个常量,即当前队列的名称
    public static final String SECKILL_ORDER_QUEUE="seckill_order";


    /**
     * 通过bean的形式生成一个队列
     * @return
     */
    @Bean
    public Queue queue(){
        return new Queue(SECKILL_ORDER_QUEUE,true);
    }
}
